package interview.CooperateSystem.common;

import interview.CooperateSystem.common.entity.Message;
import interview.CooperateSystem.common.handler.Handler;
import interview.CooperateSystem.common.handler.HandlerContext;

/**
 * Created by angela on 6/6/2014.
 */
public class CommonHandleContext implements HandlerContext {

    public static Handler getInstance(){
        return null;
    }

    private void addHandlerToContext(Handler handler,String messageType){

    }


    public void initBuilder(Message message){
        addHandlerToContext(HandlerBuilder.buildHandler(message.getMessagePlatformType()), message.getMessagePlatformType());
    }
    @Override
    public Handler getHandler(Message message) {

        //if null
        initBuilder(message);

        return null;//return from a map
    }
}
